<ng-container *ngFor="let v of (list$ | async)">
	<button class="btn btn-sm btn-outline-info m-btn--pill mr-3 item" (click)="delete(v.id)">{{ v.name }}</button>
</ng-container>
<button class="btn-add" mat-icon-button (click)="add = true" *ngIf="!add; else addRef">
	<mat-icon>add</mat-icon>
</button>

<ng-template #addRef>
	<div class="add-form-group">
		<input type="text" class="form-control form-control-sm" #nameInput />
	</div>
	<button mat-icon-button (click)="save(nameInput.value)">
		<mat-icon>save</mat-icon>
	</button>
	<button mat-icon-button (click)="add = false">
		<mat-icon>cancel</mat-icon>
	</button>
</ng-template>
